
<?php include_once("header.html")?>


<div id="wrap">  <br />
	<?php include_once("home_left.html")?>
    <div class="admincontent">

      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="88%" class="announcement">
	<script>
var marqueeContent=new Array();   //滚动主题
<?php if (isset($latestan)&&is_array($latestan)) {
          	foreach ($latestan as $k=> $v) {
          	echo "marqueeContent[$k]='<a href=\"/index.php/home/noticedetail/{$v['an_id']}\"> [{$v['an_date']}] ".splitx($v['an_title'])."</a>';";
          	}
          }?>

var marqueeInterval=new Array();  //定义一些常用而且要经常用到的变量
var marqueeId=0;
var marqueeDelay=4000;
var marqueeHeight=20;
function initMarquee() {
 var str=marqueeContent[0];
 document.write('<div id="marqueeBox" style="float:left;overflow:hidden;line-height:'+marqueeHeight+'px;height:'+marqueeHeight+'px" onmouseover="clearInterval(marqueeInterval[0])" onmouseout="marqueeInterval[0]=setInterval(\'startMarquee()\',marqueeDelay)">'+str+'</div>');
 marqueeId++;
 marqueeInterval[0]=setInterval("startMarquee()",marqueeDelay);
 }
function startMarquee() {
 var str=marqueeContent[marqueeId];
 var marqueeBox = document.getElementById("marqueeBox");
  marqueeId++;
 if(marqueeId>=marqueeContent.length) marqueeId=0;

 if(marqueeBox.childNodes.length==1) {
 	var nextLine=document.createElement('DIV');
  	nextLine.innerHTML=str;
  	marqueeBox.appendChild(nextLine);
  }
 else {
  	//if( marqueeBox.childNodes[0].innerHTML) marqueeBox.childNodes[0].innerHTML=str;
  	 marqueeBox.appendChild(marqueeBox.childNodes[0]);
 	 marqueeBox.scrollTop=0;
  }
 	clearInterval(marqueeInterval[1]);
	 marqueeInterval[1]=setInterval("scrollMarquee()",10);
 }
function scrollMarquee() {
	var marqueeBox = document.getElementById("marqueeBox");
 	marqueeBox.scrollTop++;
 	if(marqueeBox.scrollTop%marqueeHeight==marqueeHeight){
  		clearInterval(marqueeInterval[1]);
  	}
 }
initMarquee();
</script>
          </td>
          <td width="12%" class="announcementmore"><a href="/index.php/home/notice"><?php echo lang('more')?>...</a></td>
        </tr>
      </table>
    <br />
    <table width="100%" border="0" cellspacing="0" cellpadding="0">

        <tr>
          <td><div class="table2TitleBg">
            <div class="table2TitleBg2">
		      	<div class="table2Title"><div class="table2TitleLeft"><span><?php echo lang('my_assignments')?></span></div></div>
            </div>
           </div></td>
        </tr>
        <tr>

          <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td class="table2LeftBorder"></td>
              <td>
              <?php
              if(isset($myassignment)&& is_array($myassignment)){
				foreach ($myassignment as $k=>$v){
				if($v['user_id']==0 || $v['user_id']==$user['user_id']){ //add by wendy at 2010.10.25
				?>
          		<div class="mission">
               	  <div class="logo"><p>
               	  <?php
               	   if($v['selected']) {?>
               	   <a href="/index.php/home/assignment/a_id/<?php echo $v['a_id']?>"><img src="/public/upload/logo/<?php if(!empty($v['b_logo'])) echo $v['b_logo'] ;else echo $v['c_logo']?>" width="68" height="68" border="0" /></a>
               	  <?php }else {?>
               	  <img src="/public/images/<?php echo lang("nopass_img");?>" border="0" />
               	  <?php }?>
               	  </p></div>
                <div class="des"><span style="color:#000;"></span><b><a href="/index.php/home/assignment/a_id/<?php echo $v['a_id']?>"><?php echo splitx($v['a_title']);?></a></b><br />
                      <?php echo lang('start_date')?>：<?php echo str_replace('-','/',$v['a_sdate']);?><br />

                   <?php echo lang('end_date')?> ：<?php echo str_replace('-','/',$v['a_edate']);?><br />
               		<?php echo lang('status')?>：<?php echo ($v['a_finish']*100)."%";?></div>
                </div>

          		<?php }
          		}
          		}
          		?>


                </div>
              </td>
              <td class="table2RightBorder"></td>
            </tr>
            <tr>
              <td class="table2BottomLeft"></td>
              <td class="table2Bottom"></td>
              <td class="table2BottomRight"></td>
            </tr>

          </table></td>
        </tr>
      </table>
      <br />

      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><div class="table2TitleBg">
              <div class="table2TitleBg2">
     		 	<div class="table2Title"><div class="table2TitleLeft"><span><a href="/index.php/home/allassignment"><?php echo lang('recent_assignments')?></a></span></div></div>
              </div>
          </div></td>
        </tr>

        <tr>
          <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td class="table2LeftBorder"></td>
                <td> <?php
              if(isset($lastestassignment)&& is_array($lastestassignment)){
							foreach ($lastestassignment as $k=>$v){?>
                    <div class="mission">
                      <div class="logo">
                        <p><a href="/index.php/home/assignment/a_id/<?php echo $v['a_id']?>"><img src="/public/upload/logo/<?php if(!empty($v['b_logo'])) echo $v['b_logo'] ;else echo $v['c_logo']?>" width="68" height="68" border="0" /></a></p>
                      </div>
                      <div class="des"><span style="color:#000;"></span><b><a href="/index.php/home/assignment/a_id/<?php echo $v['a_id']?>"><?php echo splitx($v['a_title'])?></a></b><br />

                        <?php echo lang('start_date')?>：<?php echo $v['a_sdate']?><br />
                      <?php echo lang('end_date')?>：<?php echo $v['a_edate']?></div>
                    </div>
                   <?php
							}
              }
              ?>
                </td>
                <td class="table2RightBorder"></td>
              </tr>
              <tr>
                <td class="table2BottomLeft"></td>
                <td class="table2Bottom"></td>

                <td class="table2BottomRight"></td>
              </tr>
          </table></td>
        </tr>
      </table>
      <br />

	  <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><div class="table2TitleBg">
              <div class="table2TitleBg2">
     		 	<div class="table2Title"><div class="table2TitleLeft"><span><?php echo lang('my_calendar')?></span></div></div>
              </div>
          </div></td>
        </tr>
        <tr>
          <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td class="table2LeftBorder"></td>
                <td>

                <iframe src="/index.php/home/calendar" frameborder="0" width="100%" height="600px"></iframe>

                </td>
                <td class="table2RightBorder"></td>
              </tr>

              <tr>
                <td class="table2BottomLeft"></td>
                <td class="table2Bottom"></td>
                <td class="table2BottomRight"></td>
              </tr>
          </table></td>
        </tr>
      </table>
      <br />

      </div>
</div>
</div>
<?php include_once("footer.html")?>
